import { WebSocket } from 'ws'

class Controller {
    // ws.send(JSON.stringify({ url: '/test', data: {msg: 'message中文'} }))
    test1(ws: WebSocket, data: any) {
        console.log("Controller-test1", data)
        ws.send(JSON.stringify({ url: '/test1', data: { test1: '3123123' } }))
        setTimeout(() => {
            ws.close()
        }, 2000)
    }
}

export default new Controller()